home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-1097 / AMOSLIST / text0172.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  2.4 KB  |  55 lines

  1. On 16-Okt-97, Declan_Gorman@modusmedia.com smashed the keyboard with:
  2. >     
  3. >     I will try to explain this the best I can so bear with me
  4. >     
  5. >     I am trying to copy a memory block of 256 bytes from one address to 
  6. >     another using the following line of code which is causing my system to 
  7. >     crash.
  8. >     
  9. >     Copy Start(SBNK)+Val(SVCE$(SMZ)),Start(SBNK)+Val(SVCE$(SMZ))+256 to 
  10. >     Start(20)
  11. >     
  12. >     where SBNK is either 10 or 11 and SMZ ranges from 1 to 128
  13. >     
  14. >     At one stage when I ran the program where SBNK is 10 and SMZ is 1 I 
  15. >     got the following values
  16. >     
  17. >     Copy 1225400,1225656 to Start(20)
  18. >     
  19. >     The same line of code in direct mode does not crash and works fine but 
  20. >     when run through my program it crashes.
  21. >     
  22. >     I went stepped through everything to verify that I was getting valid 
  23. >     values for both SBNK and SMZ and every time they were valid.
  24. >     
  25.  
  26. Uhh, this is a bit of a long-shot, but try to calculate the val's outside
  27. of the command.. (something like: wa=val(svce$(n)) and then use the variable
  28. in the copy command, don't know why it happens, but by putting a break down
  29. after the 'val' you can at least see what part goes wrong (I'm suspecting 
  30. the VAL very much as the Copy command never gives me any problems at all).
  31.  
  32. Here's a few check-points for your help, but you proberly know them..
  33.  
  34. .. 'Copy' MUST use EVEN adresses, be very sure about this !!!
  35. .. 'VAL' sometimes screws up when encountering strange char's, so make sure
  36.    that the string starts right out with a valid number. Also be sure that
  37.    the number is terminated by either a 'normal' char (A-Z,a-z) or space or
  38.    the end of the string..
  39. .. Have you tried to enter the numbers directly in the copy command ??
  40.  
  41. NB: The EVEN adresses on Copy should only apply to 68000->68020 CPU's, 
  42.     newer ones SHOULD be able to cope with uneven (Havn't tried it)..
  43.  
  44. -- 
  45. Happy greetings, Yours..
  46. __________________________________________________________________________
  47.  /_  __/ __  / __  /\  ___\  __ \__  _\           aka. JENS VANG PETERSEN
  48.   / / / /_/ / ____/  \ \___\  __ \ \ \  Nyvej 8, DK-4450 Jyderup, Denmark
  49.  /_/ /_____/_/        \_____\_\ \_\ \_\             top_cat@post8.tele.dk
  50. --------------------------------------------------------------------------
  51.  Never forget the 'Queen Of Hearts', Diana, Princess Of Wales, 1961->1997
  52. --------------------------------------------------------------------------
  53.  
  54.  
  55.